package com.zhouxiaoge.factorypattern;

import com.zhouxiaoge.factorypattern.factory.ShapeFactory;
import com.zhouxiaoge.factorypattern.interfaces.Shape;

public class FactoryPatternDemo {
    public static void main(String[] args) {
        ShapeFactory shapeFactory = new ShapeFactory();

        Shape circle = shapeFactory.getShape("CIRCLE");
        circle.draw();

        Shape rectangle = shapeFactory.getShape("RECTANGLE");
        rectangle.draw();

        Shape square = shapeFactory.getShape("square");
        square.draw();

    }
}
